/**
 * 六、数组方法
   Standard built-in objects
Properties
    Array.prototype[@@unscopables]
    Array.prototype.length
Methods
    Array.prototype[@@iterator]()
    get Array[@@species]
    Array.prototype.at()
    Array.prototype.concat()
    Array.prototype.copyWithin()
    Array.prototype.entries()
    Array.prototype.every()
    Array.prototype.fill()
    Array.prototype.filter()
    Array.prototype.find()
    Array.prototype.findIndex()
    Array.prototype.flat()
    Array.prototype.flatMap()
    Array.prototype.forEach()
    Array.from()
    Array.prototype.groupBy()
    Array.prototype.groupByToMap()
    Array.prototype.includes()
    Array.prototype.indexOf()
    Array.isArray()
    Array.prototype.join()
    Array.prototype.keys()
    Array.prototype.lastIndexOf()
    Array.prototype.map()
    Array.of()        --创建变量
    Array.prototype.pop()
    Array.prototype.push()
    Array.prototype.reduce()
    Array.prototype.reduceRight()
    Array.prototype.reverse()
    Array.prototype.shift()
    Array.prototype.slice()
    Array.prototype.some()
    Array.prototype.sort()
    Array.prototype.splice()
    Array.prototype.toLocaleString()
    Array.prototype.toSource()
    Array.prototype.toString()
    Array.prototype.unshift()
    Array.prototype.values()
Inheritance:
    Function
    Properties
    Function.arguments
    Function.caller
    Function.displayName
    Function.length
    Function.name
Methods
    Function.prototype.apply()
    Function.prototype.bind()
    Function.prototype.call()
    Function.prototype.toSource()
    Function.prototype.toString()
 */


const arr = [
    {id:0,name:"小费",age:23,school:"五和中学"},
    {id:1,name:"小费1",age:24,school:"五合中学"},
    {id:2,name:"小费2",age:25,school:"五治中学"},
    {id:3,name:"小费3",age:26,school:"五一中学"},
    {id:4,name:"小费4",age:27,school:"五四中学"},
]
/**1.map()方法*/ 
const list = arr.map(item => item.name)
console.log("map方法返回值：", list) //(5) ['小费', '小费1', '小费2', '小费3', '小费4']
const list2 = arr.map(item => item.id > 1)
console.log("map方法返回值id>1：", list2) // (5) [false, false, true, true, true]
/**2.filter()方法*/ 
const list3 = arr.filter(item => item.age > 24)
console.log("map方法返回值id>1：", list3) //
/**3.fill()方法*/ 
const array = [1,2,3,4,5,6,7,8,9,10]
const list4 = array.fill(0,1,7) 
console.log(list4)
console.log(array) //会改变原数组
/**4.reverse()方法*/ 
const arr2 = [1,2,3,4,5,6,7,8,9]
console.log(arr2.reverse()) //
console.log(arr2) //会改变原数组
/**5.some()方法*/ 
console.log(arr2.some(num => num > 8)) //false
/**6.every()方法*/ 
console.log(arr2.every(num => num > 10)) //false